package com.yuerenjf.yuerenjinfu.utils;

import android.app.Activity;
import android.util.DisplayMetrics;

public class ConstantUtils {
    public static final String SP_USER_PHONE = "userphone";
    public static final String SP_USER_NAME = "userName";
    public static final String SP_USER_PWD = "pwd";
    public static final String SP_COOKIE = "cookie";
    public static final String SP_UID = "uid";
    public static final String SP_SECRET = "secret";
    public static final String SP_KEEP_CODE = "keep_code";
    public static final String SP_WEB_SIGNATURE = "web_signature";
    public static final String SP_SIGNATURE = "signature";
    public static final String SP_ARTICLE = "article";
    public static final String SP_SHOW_UPDATE = "show_update";
    public static final String SP_SYS_TIME = "sys_time";
    public static final String SP_VERSION = "version";
    public static final String SP_VERSION_DESC = "version_desc";
    public static final String SP_VERSION_URL = "version_url";
    public static final String SP_PHONE = "phone";
    public static final String SP_AVATAR = "user_avatar";

    public static final String SP_TOKEN = "token";
    public static final String SP_TOKEN_TIME = "token_time";

    public static final String SP_SIGNATURE_TIME="signature_time";

    public final static int SUCESS = 0;
    public final static int FAILURE = -1;

    /**
     * 当前屏幕宽高
     */
    public static int HEIGHT_SCREEN;
    public static int WIDTH_SCREEN;

    public static void initiScreenParam(Activity activity) {
        DisplayMetrics display = new DisplayMetrics();
        activity.getWindowManager().getDefaultDisplay().getMetrics(display);
        ConstantUtils.WIDTH_SCREEN = display.widthPixels;
        ConstantUtils.HEIGHT_SCREEN = display.heightPixels;
    }
}
